cc =  sw5cc.old -O3 -host 
cc_slave = sw5cc.old -O3 

SIMD = #-DSIMD  -msimd 
FLAGS=  -DSIZEX=242 -DSIZEY=242 -DSIZEZ=242 -DBLKY=30 -DBLKZ=60 -DCHECK -D_PROFILING  
LIBFLAGS =  -I/usr/sz/swcc/sw3gcc-binary/include

OBJECT = master.o slave.o

3d7p_stream: master.o slave.o stream

master.o: master.c
	$(cc) $(FLAGS)  -c  master.c  $(LIBFLAGS)
slave.o: slave.c
	$(cc_slave) $(FLAGS)  -c slave.c
stream:  $(OBJECT) 
	$(cc_slave) -hybrid  -o 3d7p_stream $(OBJECT)

slave_simd.o: slave_simd.c
	$(cc_slave) $(FLAGS) $(SIMD) -c slave_simd.c
stream_simd:  master.o slave_simd.o 
	$(cc_slave) -hybrid  -o 3d7p_stream_simd master.o slave_simd.o
clean:
	@-rm -f *.o 3d7p_stream  3d7p_stream_simd

